/* eslint-env node */
/**
 * 前后端交互接口模拟：参考示例
 */
const data = {code: 200, msg: "success"}
module.exports = function (app) {
  const express = require('express')
  const userInfoRouter = express.Router()
  userInfoRouter.get('/list', function (req, res) {
    res.send(data)
    res.status(200).end()
  })

  userInfoRouter.post('/create', function (req, res) {
    res.send(data)
    res.status(200).end()
  })
  userInfoRouter.get('/index', function (req, res) {
    res.render('index'/*, { movies:movies }*/);
  })

  app.use('/clienta', userInfoRouter)
}
